package com.demo.lab.config;

import com.p6spy.engine.spy.appender.MessageFormattingStrategy;

public class P6SpyLogger implements MessageFormattingStrategy {
    @Override
    public String formatMessage(int connectionId, String now, long elapsed, String category, String prepared, String sql, String s4) {
        return " Consume Time：" + elapsed + " ms " + "\n Execute SQL：" + sql.replaceAll("[\\s]+", " ") + "\n";
    }
}
